package cn.exrick.xboot.modules.news.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author Exrick
 */
@Data
@Entity
@Table(name = "t_news")
@TableName("t_news")
@ApiModel(value = "新闻")
public class news extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "新闻标题")
    private String newsTitle;
    @ApiModelProperty(value = "新闻内容")
    private String newsConten;
    @ApiModelProperty(value = "新闻描述")
    private String newsDesc;
    @ApiModelProperty(value = "新闻图片路径")
    private String newsImagePath;
    @ApiModelProperty(value = "新闻级别")
    private Integer newsRate;
    @ApiModelProperty(value = "是否置顶")
    private Integer newsIsTop = 1;
    @ApiModelProperty(value = "发布状态：1：发布 2：待发布")
    private  Integer newsRelease;
    /**
     * 新增合表字段
     */
    @ApiModelProperty(value = "地址")
    private String url;
    @ApiModelProperty(value = "数据来源（记录数据是从什么系统推送过来的）")
    private String source;
    @ApiModelProperty(value = "图片地址）")
    private String imageUrl;
    @ApiModelProperty(value = "区分本地新闻和异构新闻1:本地 0：异构系统")
    private String infoCode;
    @ApiModelProperty(value = "部门")
    private String department;
    @ApiModelProperty(value = "备用字段")
    private String newsId;
    /**
    * 新增合表字段
    */

    /**
     * 非数据库字段 begin
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "图片表id")
    private transient String imageId;
    @TableField(exist = false)
    @ApiModelProperty(value = "用于存储查询条件字段")
    private transient Integer num;
    @TableField(exist = false)
    @ApiModelProperty(value = "接口")
    private transient String urlInterface;
    /**
     * 非数据库字段 end
     */
    /**
     * 统一标识字段
     */
    @ApiModelProperty(value = "新闻标识ID")
    private String infoId;


    /**
     * 20200814
     * njp
     * 组织机构权限改造
     * 需求编号:portal_SP二期分级改造
     * begin
     */
    @ApiModelProperty(value = "所属部门id")
    private String departmentId;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "所属部门名称")
    private String departmentTitle;
    //20200814 njp 组织机构权限改造 portal_SP end
}